package live_schedule

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/apis/live_schedule"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerChannelBasicRouter)
}

// registerChannelBasicRouter
func registerChannelBasicRouter(v1 *gin.RouterGroup) {
	api := apis.ChannelBasic{}
	r := v1.Group("/channel-basic")
	{
		r.POST("/get-list", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("/insert", api.Insert)
		r.POST("/update", api.Update)
		r.POST("/delete", api.Delete)
		r.POST("/get-channels-by-source", api.GetChannelsBySource)
		r.POST("/get-channel-task-statistics", api.GetChannelTaskStatistics)
		r.POST("/create-time-task", api.CreateTimeTask)
		r.POST("/start-or-stop-time-task", api.StartOrStopTimeTask)
		r.POST("/save-cycle-time", api.SaveCycleTime)
		r.POST("/get-cycle-time", api.GetCycleTime)
		r.POST("/delete-cycle-time", api.DeleteCycleTime)
		r.POST("/generate-cycle-time", api.GenerateCycleTime)
		r.POST("/cancel-cycle-time", api.CancelCycleTime)
	}
}
